package com.racetrack

class Registration {
    
    Boolean paid
    Date dateCreated    //maintained by grails
    // Date lastUpdated


    static mapping = {
        //
        //autoTimestamp(false)
        //map class to table name, and field to column name
    }

    static belongsTo = [race: Race, runner: Runner]
    static constraints = {
        race()
        runner()
        paid()
        dateCreated()
    }
    
    def beforeInsert ={
    }

    def beforeUpdate ={

    }

    def beforeDelete ={

    }

    def onLoad ={

    }

    String toString(){
        return "${dateCreated} "
    }

}
